Optimal. Leaf size=51 \[ \frac {1}{2} x^2 \left (a^2-b^2\right )-\frac {a b \log \left (\cos \left (c+d x^2\right )\right )}{d}+\frac {b^2 \tan \left (c+d x^2\right )}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3747, 3477, 3475} \[ \frac {1}{2} x^2 \left (a^2-b^2\right )-\frac {a b \log \left (\cos \left (c+d x^2\right )\right )}{d}+\frac {b^2 \tan \left (c+d x^2\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3477
Rule 3747
Rubi steps
\begin {align*} \int x \left (a+b \tan \left (c+d x^2\right )\right )^2 \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int (a+b \tan (c+d x))^2 \, dx,x,x^2\right )\\ &=\frac {1}{2} \left (a^2-b^2\right ) x^2+\frac {b^2 \tan \left (c+d x^2\right )}{2 d}+(a b) \operatorname {Subst}\left (\int \tan (c+d x) \, dx,x,x^2\right )\\ &=\frac {1}{2} \left (a^2-b^2\right ) x^2-\frac {a b \log \left (\cos \left (c+d x^2\right )\right )}{d}+\frac {b^2 \tan \left (c+d x^2\right )}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.20, size = 75, normalized size = 1.47 \[ \frac {2 b^2 \tan \left (c+d x^2\right )-i \left ((a+i b)^2 \log \left (-\tan \left (c+d x^2\right )+i\right )-(a-i b)^2 \log \left (\tan \left (c+d x^2\right )+i\right )\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.58, size = 51, normalized size = 1.00 \[ \frac {{\left (a^{2} - b^{2}\right )} d x^{2} - a b \log \left (\frac {1}{\tan \left (d x^{2} + c\right )^{2} + 1}\right ) + b^{2} \tan \left (d x^{2} + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.71, size = 53, normalized size = 1.04 \[ \frac {{\left (d x^{2} + c\right )} a^{2} - {\left (d x^{2} + c - \tan \left (d x^{2} + c\right )\right )} b^{2} - 2 \, a b \log \left ({\left | \cos \left (d x^{2} + c\right ) \right |}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 72, normalized size = 1.41 \[ \frac {\arctan \left (\tan \left (d \,x^{2}+c \right )\right ) a^{2}}{2 d}-\frac {\arctan \left (\tan \left (d \,x^{2}+c \right )\right ) b^{2}}{2 d}+\frac {a b \ln \left (1+\tan ^{2}\left (d \,x^{2}+c \right )\right )}{2 d}+\frac {b^{2} \tan \left (d \,x^{2}+c \right )}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 149, normalized size = 2.92 \[ \frac {1}{2} \, a^{2} x^{2} - \frac {{\left (d x^{2} \cos \left (2 \, d x^{2} + 2 \, c\right )^{2} + d x^{2} \sin \left (2 \, d x^{2} + 2 \, c\right )^{2} + 2 \, d x^{2} \cos \left (2 \, d x^{2} + 2 \, c\right ) + d x^{2} - 2 \, \sin \left (2 \, d x^{2} + 2 \, c\right )\right )} b^{2}}{2 \, {\left (d \cos \left (2 \, d x^{2} + 2 \, c\right )^{2} + d \sin \left (2 \, d x^{2} + 2 \, c\right )^{2} + 2 \, d \cos \left (2 \, d x^{2} + 2 \, c\right ) + d\right )}} + \frac {a b \log \left (\sec \left (d x^{2} + c\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.24, size = 52, normalized size = 1.02 \[ x^2\,\left (\frac {a^2}{2}-\frac {b^2}{2}\right )+\frac {b^2\,\mathrm {tan}\left (d\,x^2+c\right )}{2\,d}+\frac {a\,b\,\ln \left ({\mathrm {tan}\left (d\,x^2+c\right )}^2+1\right )}{2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.21, size = 65, normalized size = 1.27 \[ \begin {cases} \frac {a^{2} x^{2}}{2} + \frac {a b \log {\left (\tan ^{2}{\left (c + d x^{2} \right )} + 1 \right )}}{2 d} - \frac {b^{2} x^{2}}{2} + \frac {b^{2} \tan {\left (c + d x^{2} \right )}}{2 d} & \text {for}\: d \neq 0 \\\frac {x^{2} \left (a + b \tan {\relax (c )}\right )^{2}}{2} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________